import { Evn } from 'dingtalk-app/dtalk/DingConfig';
import * as fs from 'fs';
import * as moment from 'moment';
let fork = require('child_process').fork;
const unhandledRejections=new Map();
/**
 * Evn
 */
class Env implements Evn {

    public corpId: string;
    public corpsecret: string;
    public noncestr: string;
    public agentId: number;
    public ticketCb: any;
    public expiresIn: number;
    public domain: string;
    logPath: string
    serPort: string;
    dbUrl: string;
    dbUser: string;
    dbPass: string;
    token: string;
    aes_key: string
    callBackUrl: string
    constructor() {

    }
}

let env: Env
console.log(process.env.NODE_ENV);
if (process.env.NODE_ENV === "dev") {
    console.log('开发环境');
    env = require('./dev.json') as Env
} else {
    console.log('生产环境');
    env = require('./prod.json')
}

export default env;